package com.bcmusic.authorization.dao;
import com.bcmusic.authorization.pojo.Authorization;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.IdListMapper;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/****
 * @Author:admin
 * @Description:Authorization的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface AuthorizationMapper extends Mapper<Authorization>, IdListMapper<Authorization,Integer>, InsertListMapper<Authorization> {
    /**
     * 查询已购买音乐
     * @param ownerNumber
     * @return
     */
    @Select("SELECT * FROM authorization WHERE owner_number = #{owner_number}")
    List<Authorization>getBoughtMusic(@Param("owner_number") String ownerNumber);
}
